package com.example.mybgabanner;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class LoginActivity extends AppCompatActivity {


    private TextView skip ;
    private  Button enter ;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);

        initView();
        setListener();


    }

    private void setListener() {
        /*跳过进入*/
        skip.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent1=new Intent( LoginActivity.this,MainActivity.class);
               startActivity(intent1);
               finish();
            }
        });
        /*直接进入*/
        enter.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent2=new Intent( LoginActivity.this,MainActivity.class);
                startActivity(intent2);
                finish();
            }
        });


    }

    private void initView() {
        skip=findViewById(R.id.skip) ;
        enter=findViewById(R.id.enter) ;

    }
}
